<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="BLL.*"%>
<%@ page import="Model.*"%>
<%@ page import="java.sql.Blob"%>
<%@ page import="java.io.OutputStream"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<table border="8"><tr><td>
<% 	int id=Integer.parseInt(request.getParameter("i"));
	User u=new UserBLL().QueryPic(id);
		Blob b=u.getPic();
		long size=b.length();
		byte[] bs=b.getBytes(1,(int)size);
		response.setContentType("image/jpeg");
		OutputStream outs=response.getOutputStream();
		outs.write(bs); 
		outs.flush();
		outs.close();
%>
</td></tr></table>
</body>
</html>